export const publicStr = "views/devices/list/config/dialog.";
export default (t: (arg0: string) => any) => [
  {
    prop: "name",
    label: "姓名",
    rules: [{ required: true, message: "请输入姓名", trigger: "blur" }],
    fct: {
      placeholder: "请输入姓名",
      type: "input",
      model: "name",
    },
  },
  {
    prop: "city",
    label: "城市",
    rules: [{ required: true, message: "请选择城市", trigger: "change" }],
    fct: {
      placeholder: "请选择城市",
      clearable: true,
      multiple: true,
      type: "select",
      model: "city",
      options: [
        { label: "深圳", value: "shenzhen" },
        { label: "广州", value: "guangzhou" },
        { label: "东莞", value: "dongguan" },
      ],
    },
  },
  {
    label: "是否开启",
    fct: {
      type: "switch",
      model: "active",
      activeText: t(`${publicStr}open`),
      inactiveText: t(`${publicStr}disable`),
      inlinePrompt: true,
    },
  },
  {
    label: "地址",
    fct: {
      placeholder: "请输入地址",
      type: "input",
      model: "address",
    },
  },
  {
    prop: "date",
    label: "日期",
    rules: [{ required: true, message: "请选择日期", trigger: "blur" }],
    fct: {
      placeholder: "请选择日期",
      type: "date",
      model: "date",
    },
  },
  {
    prop: "gender",
    label: "性别",
    rules: [{ required: true, message: "请选择性别", trigger: "change" }],
    fct: {
      type: "radio",
      model: "gender",
      options: [
        { label: "男", value: 0 },
        { label: "女", value: 1 },
        { label: "未知", value: 2 },
      ],
    },
  },
  {
    prop: "hobby",
    label: "爱好",
    rules: [{ required: true, message: "请选择爱好", trigger: "change" }],
    fct: {
      type: "checkbox",
      model: "hobby",
      options: ["吃饭", "睡觉", "打游戏", "电影"],
    },
  },
  {
    type: "langs",
    path: "views/devices/list/config/dialog",
  },
];
